﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Forging2.Common
{
    [NotMapped]
    public class WorkingPiece : DataBase.ZH_IMES.V_ForgingOperateData, INotifyPropertyChanged
    {
        public int InFurnaceTemperatures { get; set; }
        public int OutFurnaceTemperatures { get; set; }
        public int WorkpieceHeight { get; set; }
        public int WorkpieceTemperatures { get; set; }
        public string Operater { get; set; }

        public event PropertyChangedEventHandler PropertyChanged;
        public void NotifyPropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = "")
        {
            //PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));

            if (PropertyChanged != null)
            {
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
                if (propertyName=="DIS_CODE_STATE")
                {
                    Console.WriteLine(propertyName);
                }
            }

        }       



    }
}
